Puppet Types and Providers by Dan Bode & Nan Liu

Puppet Types and Providers by Dan Bode & Nan Liu

Author:Dan Bode & Nan Liu [Bode, Dan and Liu, Nan]
Language: eng
Format: epub, pdf
ISBN: 9781449339326
Publisher: O’Reilly Media, Inc.
Published: 2013-03-25T16:00:00+00:00


File confinement

The confine method can use exists to base confinement on whether a specific file is present on the managed system.

The example below demonstrates how a provider managing the Puppet config file is restricted to systems where a valid Puppet configuration file already exists:

Puppet::Type.type(:puppet_config).provide(:ruby) do # Puppet[:config] varies depending on the account running puppet. # ~/.puppet/puppet.conf or /etc/puppet/puppet.conf confine :exists => Puppet[:config] end



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.